/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.employee.entity;

import org.hibernate.validator.constraints.Length;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

/**
 * 员工假期Entity
 * 
 * @author hui.li
 * @version 2017-07-18
 */
public class EmployeeLeave extends DataEntity<EmployeeLeave> {

    private static final long serialVersionUID = 1L;
    private String            employeeNumber;       // 员工编号
    private String            employeeName;         // 姓名
    private Date              applicationDate;      // 申请时间
    private String            type;                 // 休假类型
    private Date              startTime;            // 开始时间
    private Date              endTime;              // 结束时间
    private String            leaveTime;            // 休假时长
    private String            dataStatus;           // 数据状态
    private String            approvalStatus;       // 审批状态
    private String            reason;               // 休假原因
    private String            currentApprover;      // 当前审批人
    private Date              beginStartTime;       // 开始 开始时间
    private Date              endStartTime;         // 结束 开始时间

    private String            companyId;
    private String            officeId;
    private String            isCalculate;

    public EmployeeLeave(){
        super();
    }

    public EmployeeLeave(String id){
        super(id);
    }

    public EmployeeLeave(String employeeNumer, Date startTime, Date endTime, String delFlag){
        this.employeeNumber = employeeNumer;
        this.beginStartTime = startTime;
        this.endStartTime = endTime;
        this.delFlag = delFlag;
    }

    @Length(min = 1, max = 100, message = "员工编号长度必须介于 1 和 100 之间")
    @ExcelField(title = "员工编号", type = 0, align = 2, sort = 10)
    public String getEmployeeNumber() {
        return employeeNumber;
    }

    public void setEmployeeNumber(String employeeNumber) {
        this.employeeNumber = employeeNumber;
    }

    @Length(min = 1, max = 100, message = "姓名长度必须介于 1 和 100 之间")
    @ExcelField(title = "员工姓名", type = 0, align = 2, sort = 20)
    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    // @NotNull(message="申请时间不能为空")
    @ExcelField(title = "申请时间", type = 0, align = 2, sort = 30)
    public Date getApplicationDate() {
        return applicationDate;
    }

    public void setApplicationDate(Date applicationDate) {
        this.applicationDate = applicationDate;
    }

    @Length(min = 1, max = 64, message = "休假类型长度必须介于 1 和 64 之间")
    @ExcelField(title = "休假类型", type = 0, align = 2, sort = 40, dictType = "employeeLeave_type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "开始时间不能为空")
    @ExcelField(title = "开始时间", type = 0, align = 2, sort = 50)
    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "结束时间不能为空")
    @ExcelField(title = "结束时间", type = 0, align = 2, sort = 60)
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Length(min = 1, max = 11, message = "休假时长长度必须介于 1 和 11 之间")
    @NotNull(message = "休假时长不能为空")
    @ExcelField(title = "休假时长", type = 0, align = 2, sort = 70)
    public String getLeaveTime() {
        return leaveTime;
    }

    public void setLeaveTime(String leaveTime) {
        this.leaveTime = leaveTime;
    }

    @ExcelField(title = "数据状态", type = 0, align = 2, sort = 80)
    public String getDataStatus() {
        return dataStatus;
    }

    public void setDataStatus(String dataStatus) {
        this.dataStatus = dataStatus;
    }

    @ExcelField(title = "审批状态", type = 0, align = 2, sort = 90)
    public String getApprovalStatus() {
        return approvalStatus;
    }

    public void setApprovalStatus(String approvalStatus) {
        this.approvalStatus = approvalStatus;
    }

    @ExcelField(title = "休假原因", type = 0, align = 2, sort = 100)
    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @ExcelField(title = "当前审批人", type = 0, align = 2, sort = 110)
    public String getCurrentApprover() {
        return currentApprover;
    }

    public void setCurrentApprover(String currentApprover) {
        this.currentApprover = currentApprover;
    }

    public Date getBeginStartTime() {
        return beginStartTime;
    }

    public void setBeginStartTime(Date beginStartTime) {
        this.beginStartTime = beginStartTime;
    }

    public Date getEndStartTime() {
        return endStartTime;
    }

    public void setEndStartTime(Date endStartTime) {
        this.endStartTime = endStartTime;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getOfficeId() {
        return officeId;
    }

    public void setOfficeId(String officeId) {
        this.officeId = officeId;
    }

    public String getIsCalculate() {
        return isCalculate;
    }

    public void setIsCalculate(String isCalculate) {
        this.isCalculate = isCalculate;
    }

}
